home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / GEDEV100.ZIP;1 / C.ZIP / GESTRUCT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-12  |  16.0 KB  |  439 lines

  1. /*
  2. **  gestruct.h
  3. **
  4. **  System data files definitions for GEcho 1.00
  5. **
  6. **  Copyright (C) 1992 Gerard J. van der Land. All rights reserved.
  7. **
  8. **  All information in this document is subject to change at any time
  9. **  without prior notice.
  10. **
  11. **  Last revision: 12-Oct-92
  12. **
  13. **  Strings are NUL padded and NUL terminated arrays of char type.
  14. **  Path names are back slash ('\') terminated.
  15. */
  16.  
  17. #define GE_THISREV 0x0002  /* System file revision level */
  18. #define AKAS           11  /* Main + AKAs */
  19. #define UPLINKS        10  /* AreaMgr uplinks */
  20. #define USERS          10  /* User names */
  21. #define MAXAREAS     1024  /* Area records */
  22. #define MAXSYSTEMS    350  /* Systems per area */
  23. #define MAXNODES      512  /* Node records */
  24.  
  25. /*
  26. **  Datatypes:
  27. **
  28. **  typedef unsigned char byte;   ( 8 bits)
  29. **  typedef unsigned int  word;   (16 bits)
  30. **  typedef unsigned long dword;  (32 bits)
  31. */
  32.  
  33. /* --- Address type */
  34.  
  35. typedef struct
  36.    {
  37.    word zone;
  38.    word net;
  39.    word node;
  40.    word point;
  41.    }
  42.    ADDRESS;
  43.  
  44. /* --- Log levels */
  45.  
  46. #define LOG_INBOUND     0x0001
  47. #define LOG_OUTBOUND    0x0002
  48. #define LOG_PACKETS     0x0004
  49. #define LOG_UNEXPECT    0x0008
  50. #define LOG_AREAMGR     0x0010
  51. #define LOG_EXTPKTINFO  0x0040
  52. #define LOG_NETEXPORT   0x0100
  53. #define LOG_NETIMPORT   0x0200
  54. #define LOG_NETPACK     0x0400
  55. #define LOG_NETMOVED    0x0800
  56. #define LOG_STATISTICS  0x2000
  57. #define LOG_MBUTIL      0x4000
  58. #define LOG_DEBUG       0x8000
  59.  
  60. /* --- Log styles */
  61.  
  62. #define LOG_FD       0
  63. #define LOG_BINK     1
  64. #define LOG_QUICK    2
  65. #define LOG_DBRIDGE  3
  66.  
  67. /* --- Setup option bits */
  68.  
  69. #define NOKILLNULL 0x0001  /* Don't kill null netmail messages while tossing */
  70. #define RESCANOK   0x0002  /* Allow rescan */
  71. #define KEEPREQS   0x0004  /* Keep AreaMgr requests */
  72. #define NONODEADD  0x0008  /* Don't automatically add NodeMgr records */
  73. #define NOUSERSBBS 0x0010  /* Don't let Import check USERS.BBS */
  74. #define USEBUFFERS 0x0020  /* Use outbound buffers */
  75. #define KEEPNET    0x0040  /* Don't use Kill/Sent on exported netmail */
  76. #define KEEPMGR    0x0080  /* Don't use Kill/Sent on MGR receipts */
  77. #define KILLDUPES  0x0200  /* Kill duplicate messages */
  78. #define ARCMAIL    0x0400  /* Use ARCmail 0.60 naming for out-of-zone mail */
  79. #define NOCRSTRIP  0x0800  /* Don't strip Soft-CRs */
  80. #define NOPIDSTRIP 0x1000  /* Don't strip PIDs */
  81. #define NOAUTODISC 0x2000  /* Don't automatically disconnect empty PT areas */
  82. #define NOCHECKEND 0x4000  /* Don't check for valid end of archives */
  83. #define SETPVT     0x8000  /* Set Pvt on imported netmail messages */
  84.  
  85. /* --- Extra option bits */
  86.  
  87. #define NOCHKDEST  0x0001  /* Don't check packet destination */
  88. #define AREASBBS   0x0002  /* Use AREAS.BBS for MBUTIL */
  89. #define PASSIVEOK  0x0004  /* Allow %PASSIVE */
  90.  
  91. /* --- Compression types */
  92.  
  93. #define PR_ARC  0  /* For compressed mail files created by ARC or PKPAK */
  94. #define PR_ARJ  1  /* For compressed mail files created by ARJ */
  95. #define PR_LZH  2  /* For compressed mail files created by LHA */
  96. #define PR_PAK  3  /* For compressed mail files created by PAK */
  97. #define PR_ZIP  4  /* For compressed mail files created by PKZIP */
  98. #define PR_ZOO  5  /* For compressed mail files created by ZOO */
  99. #define PR_SQZ  6  /* For compressed mail files created by SQZ */
  100.  
  101. /* --- Locking method */
  102.  
  103. #define LOCK_OFF    0  /* Deny Write (Exclusive) */
  104. #define LOCK_RA101  1  /* RemoteAccess 1.01 (SHARE) */
  105. #define LOCK_RA110  2  /* RemoteAccess 1.10/1.11 (SHARE) */
  106.  
  107. /* --- Semaphore mode */
  108.  
  109. #define SEMPAHORE_OFF  0  /* Don't use semaphores */
  110. #define SEMAPHORE_FD   1  /* FrontDoor 2.xx */
  111. #define SEMAPHORE_IM   2  /* InterMail 2.xx */
  112. #define SEMAPHORE_DB   3  /* D'Bridge 1.3x */
  113. #define SEMAPHORE_BT   4  /* BinkleyTerm 2.5x */
  114.  
  115. /* --- Mailer type */
  116.  
  117. #define MAILER_FD  0  /* FrontDoor */
  118. #define MAILER_DB  1  /* D'Bridge */
  119. #define MAILER_BT  2  /* BinkleyTerm */
  120.  
  121. /* --- Uplink option bits */
  122.  
  123. #define UPLINK_DIRECT  0x01
  124. #define UPLINK_ALWAYS  0x02
  125. #define UPLINK_ADDPLUS 0x04
  126.  
  127. typedef struct
  128.    {
  129.    ADDRESS address;    /* Uplink address */
  130.    char areafix[9];    /* AreaFix program */
  131.    char password[17];  /* AreaFix password */
  132.    char filename[13];  /* "Forward List" filename */
  133.    byte unused[6];
  134.    byte options;       /* See --- Uplink options bits */
  135.    byte filetype;      /* 0 = Random, 1 = "<areaname> <description>" */
  136.    dword groups;       /* Nodes must have one of these groups */
  137.    byte origin;        /* Origin AKA */
  138.    }
  139.    UPLINK;
  140.  
  141. typedef struct
  142.    {
  143.    word zone;
  144.    word net;
  145.    byte aka;
  146.    }
  147.    AKAMATCH;
  148.  
  149. /* --- SETUP.GE structure */
  150.  
  151. typedef struct
  152.    {
  153.    word sysrev;              /* Must contain GE_THISREV */
  154.    word options;             /* Options bits, see --- Setup option bits */
  155.    word autorenum;           /* Auto renumber value */
  156.    word maxpktsize;          /* Maximum packet size, 0 = unlimited */
  157.    byte logstyle;            /* See --- Log styles */
  158.    byte oldnetmailboard;     /* Netmail board, must be zero now */
  159.    byte badboard;            /* Where bad echomail is stored (0 = path) */
  160.    byte dupboard;            /* Where duplicates are stored (0 = path) */
  161.    byte recoveryboard;       /* Recovery board (1-200, 0 = delete) */
  162.    byte filebuffer;          /* Size (in KB) of MBU file I/O buffer */
  163.    byte days;                /* Days to keep old mail around */
  164.    byte swapping;            /* Swapping method */
  165.    byte compr_default;       /* Default compresion type */
  166.    byte color[15];           /* See --- Personal Mail colors */
  167.    ADDRESS aka[AKAS];        /* Main address and AKAs */
  168.    word pointnet[AKAS];      /* Pointnets for all addresses */
  169.    dword gekey;              /* GEcho registration key */
  170.    dword mbukey;             /* MBUTIL registration key */
  171.    char geregto[51];         /* Text used to generate the GEcho key */
  172.    char mburegto[51];        /* Text used to generate the MBUTIL key */
  173.    char username[USERS][36]; /* User names */
  174.    char mbpath[53];          /* Hudson message base path */
  175.    char mailpath[53];        /* Netmail path */
  176.    char inbound_path[53];    /* Where incoming compressed mail is stored */
  177.    char outbound_path[53];   /* Where outgoing compressed mail is stored */
  178.    char editor[65];          /* External full screen editor used by PM */
  179.    char nodepath[53];        /* Nodelist directory used by PMNC and PM */
  180.    char areasfile[65];       /* AREAS.BBS style file */
  181.    char logfile[65];         /* GEcho/MBUTIL log file */
  182.    char mgrlogfile[65];      /* AreaMgr log file */
  183.    char swap_path[53];       /* Swap path */
  184.    char tear_line[31];       /* Tearline to be placed by MBUTIL Export */
  185.    char originline[20][61];  /* Origin lines */
  186.    char compr_prog[10][13];       /* Compression program filenames */
  187.    char compr_switches[10][20];   /* Compression program switches */
  188.    char decompr_prog[10][13];     /* Decompression program filenames */
  189.    char decompr_switches[10][20]; /* Decompression program switches */
  190.    char groups[26][21];      /* Descriptions of area groups */
  191.    byte lockmode;            /* See --- Locking method */
  192.    char secure_path[53];     /* From which secure PKTs are tossed */
  193.    char rcvdmailpath[53];    /* Directory to which Rcvd netmail is moved */
  194.    char sentmailpath[53];    /* Directory to which Sent netmail is moved */
  195.    char semaphorepath[53];   /* Where FD rescan files are stored */
  196.    byte version_major;
  197.    byte version_minor;
  198.    byte semaphore_mode;      /* See --- Semaphore modes */
  199.    char badecho_path[53];    /* Where sec. violating and unknown mail is stored */
  200.    byte mailer_type;         /* See --- Mailer type */
  201.    word loglevel;            /* See --- Log level */
  202.    AKAMATCH akamatch[20];    /* AKA matching table */
  203.    char mbulogfile[65];      /* MBUTIL log file */
  204.    word maxqqqs;             /* Max. number of QQQ info stored in memory */
  205.    byte maxqqqopen;          /* Not used */
  206.    byte maxhandles;          /* Max. number of files used by GEcho */
  207.    word maxarcsize;          /* Max. archive size, 0 = unlimited */
  208.    byte unused[2];           /* Unused space */
  209.    word extraoptions;        /* See --- Extra option bits */
  210.    byte firstboard;          /* First available new board (0 = *.MSG) */
  211.    word reserved1;           /* Reserved */
  212.    word copy_persmail;       /* Copy personal mail for user (bits 0-9) */
  213.    byte persmailboard[USERS];/* Personal mail board (0 = path) */
  214.    dword public_groups;      /* Public groups (bits 0-25) */
  215.    word dupentries;          /* Number of duplicate entries in ECHODUPE.GE */
  216.    byte rcvdboard;           /* Where Rcvd netmail is moved to (0 = path) */
  217.    byte sentboard;           /* Where Sent netmail is moved to (0 = path) */
  218.    byte akaboard[AKAS];      /* Netmail boards for AKAs */
  219.    byte userboard[USERS];    /* Netmail boards for system users, 255 = use AKA board */
  220.    byte reserved2;           /* Reserved */
  221.    UPLINK uplink[UPLINKS];   /* Uplink manager information */
  222.    char persmail_path[53];   /* Path to store copies of personal echomail */
  223.    char outpkts_path[53];    /* Where outbound packets are temp. stored */
  224.    word compr_mem[10];       /* Memory needed for compression programs */
  225.    word decompr_mem[10];     /* Memory needed for decompression programs */
  226.    dword pwdcrc;             /* CRC-32 of access password, -1L = no password */
  227.    word default_msgs;        /* Maximum number of messages       (Purge) */
  228.    word default_days;        /* Maximum age of non-Rcvd messages (Purge) */
  229.    char gus_prog[13];        /* General Unpack Shell program filename */
  230.    char gus_switches[20];    /* GUS switches */
  231.    word gus_mem;             /* Memory needed for GUS */
  232.    word default_rcvd;        /* Maximum age of Rcvd messages     (Purge) */
  233.    }
  234.    SETUP_GE;
  235.  
  236. /***************************************************************************/
  237.  
  238. /* --- Area option bits */
  239.  
  240. #define IMPORTSB 0x0001  /* Import SEEN-BY lines to message base */
  241. #define SECURITY 0x0002  /* Only accept mail from systems in the exportlist */
  242. #define PASSTHRU 0x0004  /* Mail is not imported, only forwarded */
  243. #define VISIBLE  0x0008  /* Area is visible for anyone in AreaMgr's %LIST */
  244. #define REMOVED  0x0010  /* Area should be removed by GSETUP Pack */
  245. #define NOUNLINK 0x0020  /* Do not allow users to unlink this area */
  246. #define TINYSB   0x0040  /* Tiny SEEN-BYs without systems not in exportlist */
  247. #define PVT      0x0080  /* Private bits are preserved and are not stripped */
  248. #define CHECKSB  0x0100  /* Use SEEN-BYs for duplicate prevention */
  249. #define NOSLEEP  0x0200  /* Do not allow users to make this area passive */
  250. #define SDM      0x0400  /* Area is *.MSG style */
  251. #define NOTIFIED 0x4000  /* Sysop notified that area was disconnected */
  252. #define UPLDISC  0x8000  /* Disconnected from uplink (only for PT areas) */
  253.  
  254. /* --- Area type */
  255.  
  256. #define ECHOMAIL  0
  257. #define NETMAIL   1
  258. #define LOCAL     2
  259. #define BADECHO   3
  260. #define PERSONAL  4
  261.  
  262. /* --- AREAFILE.GE header */
  263.  
  264. typedef struct
  265.    {
  266.    word hdrsize;  /* sizeof(AREAFILE_HDR) */
  267.    word recsize;  /* sizeof(AREAFILE_GE) */
  268.    word systems;  /* Number of entries in the export list (1-MAXSYSTEMS) */
  269.    }
  270.    AREAFILE_HDR;
  271.  
  272. /* --- AREAFILE.GE record */
  273.  
  274. typedef struct
  275.    {
  276.    char name[51];       /* AREA tag, must be uppercase, no spaces */
  277.    char comment[61];    /* Description of the topics discussed in area */
  278.    char path[51];       /* Path where the *.MSG files are stored */
  279.    char originline[61]; /* Custom origin line, used if origlinenr = 0 */
  280.    word areanumber;     /* Area number (1-MAXAREAS, 1-200 = Hudson) */
  281.    char group;          /* Group (A-Z) */
  282.    word options;        /* See --- Area options bits */
  283.    byte originlinenr;   /* Origin line (1-20, 0 = custom) */
  284.    byte pkt_origin;     /* Address for the packet/Origin line (0-10) */
  285.    word seenbys;        /* Addresses (bits 0-10) to add to the SEEN-BY */
  286.    word reserved;
  287.    word msgs;           /* Maximum number of messages       (MBUTIL Purge) */
  288.    word days;           /* Maximum age of non-Rcvd messages (MBUTIL Purge) */
  289.    word rcvddays;       /* Maximum age of Rcvd messages     (MBUTIL Purge) */
  290.    byte areatype;       /* See --- Area type */
  291.    }
  292.    AREAFILE_GE;
  293.  
  294. /* --- Export entry status bits */
  295.  
  296. #define EXPT_NOREAD   0x01  /* Accept from but don't forward to this system */
  297. #define EXPT_NOWRITE  0x02  /* Don't accept from but do foward to this system */
  298. #define EXPT_HOLD     0x04  /* Temporary don't send this area to this system */
  299. #define EXPT_NOUNLINK 0x08  /* Don't allow system to disconnect */
  300.  
  301. /* --- Export list entry */
  302.  
  303. typedef struct
  304.    {
  305.    ADDRESS address;
  306.    byte status;
  307.    }
  308.    EXPORTENTRY;
  309.  
  310. /* --- AREAFILE.GEX index entry */
  311.  
  312. typedef struct
  313.    {
  314.    long crc32;       /* CRC-32 on areaname */
  315.    word areanumber;  /* Area number (1-MAXAREAS, 1-200 = Hudson) */
  316.    long offset;      /* File offset of record in AREAFILE.GE */
  317.    }
  318.    AREAFILE_GEX;
  319.  
  320. /***************************************************************************/
  321.  
  322. /* --- Status:
  323.    0x0000 = None
  324.    0x0002 = Crash
  325.    0x0200 = Hold
  326.    0xFFFF = Removed entry
  327. */
  328.  
  329. /* --- Node option bits */
  330.  
  331. #define REMOTEMAINT  0x0001
  332. #define ALLOWRESCAN  0x0002
  333. #define FORWARDREQ   0x0004
  334. #define DIRECT       0x0008
  335. #define NONOTIFY     0x0010
  336.  
  337. /* --- NODEFILE.GE header */
  338.  
  339. typedef struct
  340.    {
  341.    word hdrsize;  /* sizeof(NODEFILE_HDR) */
  342.    word recsize;  /* sizeof(NODEFILE_GE) */
  343.    }
  344.    NODEFILE_HDR;
  345.  
  346. /* --- NODEFILE.GE record */
  347.  
  348. typedef struct
  349.    {
  350.    ADDRESS address;   /* Address of the system */
  351.    char sysop[36];    /* Name of the sysop or point */
  352.    char pktpwd[9];    /* Packet (session) password */
  353.    char mgrpwd[17];   /* AreaMgr password */
  354.    dword groups;      /* Authorized groups (bits 0-25) */
  355.    word options;      /* See --- Node option bits */
  356.    byte comprtype;    /* Compression type (0 - 9, 10 = PKT) */
  357.    word status;       /* File attach status. See above */
  358.    ADDRESS route_to;  /* Address to route mail files to */
  359.    }
  360.    NODEFILE_GE;
  361.  
  362. /* --- NODEFILE.GEX index entry */
  363.  
  364. typedef struct
  365.    {
  366.    ADDRESS address;  /* Address of the system */
  367.    long offset;      /* File offset of record in NODEFILE.GE */
  368.    }
  369.    NODEFILE_GEX;
  370.  
  371. /***************************************************************************/
  372.  
  373. /* --- Routed node entry */
  374.  
  375. typedef struct
  376.    {
  377.    ADDRESS node;
  378.    byte status;
  379.    byte via;
  380.    }
  381.    ROUTE;
  382.  
  383. /* --- PACKFILE.GE structure */
  384.  
  385. typedef struct
  386.    {
  387.    ADDRESS Via[60];
  388.    ROUTE   Route[640];
  389.    }
  390.    PACKFILE_GE;
  391.  
  392. /***************************************************************************/
  393.  
  394. /* --- ECHODUPE.GE structure */
  395.  
  396. typedef struct
  397.    {
  398.    word pointer;  /* Next offset */
  399.    word entries;  /* Number of entries in the database */
  400. /*
  401.    word crc32_high[entries];     32 bit CRCs on msg headers, high portions
  402.    word crc32_low[entries];      32 bit CRCs on msg headers, low portions
  403. */
  404.    }
  405.    ECHODUPE_GE;
  406.  
  407. /***************************************************************************/
  408.  
  409. /* --- FTSCPROD.GE record */
  410.  
  411. typedef struct
  412.    {
  413.    byte cap;       /* Capability, 0 = Type 2.0, 1 = Type 2.1, 2 = Type 2+ */
  414.    char name[30];  /* Name of product */
  415.    }
  416.    FTSCPROD_GE;
  417.  
  418. /***************************************************************************/
  419.  
  420. /* --- Personal Mail colors (same as used by FrontDoor editor FM) */
  421.  
  422. #define top_line               sys.color[ 0]
  423. #define status_line            sys.color[ 1]
  424. #define error                  sys.color[ 2]
  425. #define text                   sys.color[ 3]
  426. #define text_quotes            sys.color[ 4]
  427. #define text_reverse           sys.color[ 5]
  428. #define text_hardCRs           sys.color[ 6]
  429. #define header                 sys.color[ 7]
  430. #define header_data            sys.color[ 8]
  431. #define header_data_highlight  sys.color[ 9]
  432. #define data_entry             sys.color[10]
  433. #define window_frame           sys.color[11]
  434. #define window_text            sys.color[12]
  435. #define window_select          sys.color[13]
  436. #define window_highlight       sys.color[14]
  437.  
  438. /* end of file "gestruct.h" */
  439.